package com.corpgovernment.common.utils;


import lombok.extern.slf4j.Slf4j;

/**
 * @Author: majl
 * @DateTime: 2019-5-20
 * @FileName: StringUtil
 * @Description
 */
@Slf4j
public class IntegerUtil {

    /**
     * 安全转换Int
     *
     * @param str
     * @return
     */
    public static Integer tryParseInt(String str) {
        try {
            return Integer.parseInt(str);
        } catch (Exception e) {
            log.error("tryParseInt 转换错误：{}", e);
            return null;
        }
    }
}
